from django.db import models


class User(models.Model):
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=80)
    level = models.SmallIntegerField(default=1,choices=((1,"普通用户"),(2,"vip用户")))


class Coupon(models.Model):
    sn = models.CharField(max_length=80)
    money = models.CharField(max_length=80)
    title = models.CharField(max_length=30)
    user = models.ForeignKey(User,models.CASCADE,null=True)


class Product(models.Model):
    name = models.CharField(max_length=20)
    price = models.CharField(max_length=80)
    store = models.CharField(max_length=80)
